// 框架提供的创建应用方法，可以用来创建应用实例
import { createApp } from "vue";
// 引入清除默认样式
import "@/style/reset.scss";
// 引入清除默认样式
// import "@/style.css";
// 引入样式组件库
import ElementPlus from 'element-plus';
// 引入样式库
import 'element-plus/dist/index.css';
// 引入国际化库
import { zhCn } from 'element-plus/es/locales.mjs';
// 引入图标库
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
// 导入svg图标库
import 'virtual:svg-icons-register';
// 引入根组件
// Uncaught SyntaxError: The requested module '/src/App.vue' does not provide an export named 'App' (at main.ts:18)
import App from "@/App.vue";
// 引入全局组件
// Uncaught SyntaxError: The requested module '/src/components/HospitalTop/index.vue' does not provide an export named 'HospitalTop' (at main.ts:22)
import HospitalTop from "@/components/HospitalTop/index.vue";
// Uncaught SyntaxError: The requested module '/src/components/HospitalBottom/index.vue' does not provide an export named 'HospitalBottom' (at main.ts:25)
import HospitalBottom from "@/components/HospitalBottom/index.vue";
// Uncaught SyntaxError: The requested module '/src/components/Login/index.vue' does not provide an export named 'Login' (at main.ts:28)
import Login from "@/components/Login/index.vue";
// Uncaught SyntaxError: The requested module '/src/components/Visitor/index.vue' does not provide an export named 'Visitor' (at main.ts:28)
import Visitor from "@/components/Visitor/index.vue";
// 引入路由组件库
import router from "@/router";
// 引入状态管理库
import store from "@/store";
// 引入svg图标库
import globalComponent from "@/components";
// 利用创建方法，创建应用实例，且将应用实例挂载到挂载点上
const app = createApp(App);
// 使用全局组件
app.component("HospitalTop", HospitalTop);
app.component("HospitalBottom", HospitalBottom);
app.component("Login", Login);
app.component("Visitor", Visitor);
// 安装样式库
app.use(ElementPlus, { locale: zhCn });
// 安装图标库
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
};
// 安装路由
app.use(router);
// 安装仓库
app.use(store);
// 安装svg
app.use(globalComponent);
// 引入路由鉴权的文件（已经放入路由文件中）
// import "./permisstion";
// 挂载应用
app.mount("#app");
